package SwingView.Assignment;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import JDBC.StudentAssignmentActivities;
import SwingController.CmsPresenter;
import SwingModel.CmsAssignment;
import SwingModel.CmsAssignmentSubmission;
import SwingModel.CmsUser;
import SwingView.CmsMainView;

public class ALAssignmentStudentView implements ActionListener{

	private CmsAssignment asgm;

	public ALAssignmentStudentView (CmsAssignment asgm){
		this.asgm = asgm;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		CmsUser user = CmsPresenter.user;
		CmsMainView mainView = CmsPresenter.mainView;
		
		//TODO: update this function
		CmsAssignmentSubmission asgmSub = StudentAssignmentActivities.getSubmission(user.getUsername(), asgm.getAsgmID());
		
		mainView.displayAssignmentViewStudentPage(asgm, asgmSub);
	}

}